import { useConfigStore } from '@/store/index';
import request from '@/common/vmeitime-http';

/**
 * 获取文章列表
 * @param {String} area:各区动态 o2n:以旧换新 zhengw:政务公开 discount:优惠信息 pinpai:品牌馆
*/
export function getArticleListByType(url){
  return request.request({
    url
  })
}

/**
 * 获取文章详情
 * @param {String} ID
*/
export function getArticleDetailById(id){
  return request.request({
    url: `/product/mall/article/${id}`
  })
}

//获取快讯列表
export function getExpressNews(url){
  return request.request({
    url
  })
}

/**
 * 资讯快报上下架
 */
export function newsShelveAPI(data) {
  return request.request({
    url: `/product/mall/tips/shelve/${data.id}`,
    method: 'post',
    data
  })
}

//获取贷款银行电话
export function getLoanBankPhone(){
  return request.request({
    url: `/product/mall/tools/bank`
  })
}

//获取优惠信息列表
export function getDiscountList(url){
  return request.request({
    url
  })
}

/**
 * 获取优惠信息详情
 * @param {String} id 楼盘ID
*/
export function getDiscountDetail(id){
  return request.request({
    url: `/product/mall/v6/discount/${id}`
  })
}